import javax.swing.JFrame;

public class Othello 
{ 
  public static final int GAMES_IN_TOURNAMENT = 20;

  private static JFrame frame = new JFrame("APCS Othello Challenge");
  private static IntroPanel intro = null;

  public static void main(String[] args)
  {
    frame = new JFrame("APCS Othello Challenge");
    frame.setSize(600, 600);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    showIntro();
    frame.show();
  }

  public static void showIntro()
  {
    if (intro != null)
      frame.getContentPane().remove(intro);

    intro = new IntroPanel(frame, GAMES_IN_TOURNAMENT);
    intro.registerPlayer(HumanPlayer.class);
    intro.registerPlayer(Clueless.class);
    intro.registerPlayer(Spacey.class);
    intro.registerPlayer(Conrad.class);

    frame.getContentPane().add(intro);
  }
} 
